package com.jrx.anytxn.param.service.rights;

import com.jrx.anytxn.common.exception.TxnException;
import com.jrx.anytxn.i18n.response.TxnPage;
import com.jrx.anytxn.param.dto.operation.PrPromotionInfoReq;
import com.jrx.anytxn.param.dto.operation.PrPromotionInfoRes;
import com.jrx.anytxn.param.entity.PrPromotionInfo;

/**
 * @author 张靖烽
 * @name IPrPromotionInfoService
 * @description 促销活动信息表接口层
 * @create 2020-12-08 17:05
 **/
public interface IPrPromotionInfoService
{
    /**
     * 根据租户ID分页查询
     *
     * @param pageNum  页码
     * @param pageSize 页大小
     * @param tenantId 租户ID
     * @return TxnPage<PrPromotionInfoRes>
     * @throws TxnException txn
     * @author 张靖烽
     * @create 2020-12-08 17:10
     */
    TxnPage<PrPromotionInfoRes> getAllPageByTenId(Integer pageNum, Integer pageSize, String tenantId) throws TxnException;

    /**
     * 通过促销活动信息表ID和租户Id查询信息
     *
     * @param promotionId 活动ID
     * @param tenantId 租户ID
     * @return TxnPage<PrPromotionInfoRes>
     * @throws TxnException txn
     * @author 张靖烽
     * @create 2020-12-08 17:10
     */
    PrPromotionInfoRes getByPromotionIdAndTenId(String promotionId, String tenantId) throws TxnException;

    /**
     * 增加促销活动信息表信息
     *
     * @param prPromotionInfoReq 促销活动信息实体
     * @return PrPromotionInfoRes
     * @throws TxnException txn
     * @author 张靖烽
     * @create 2020-12-08 17:11
     */
    PrPromotionInfoRes addPromotionInfo(PrPromotionInfoReq prPromotionInfoReq) throws TxnException;

    /**
     * 增加促销活动信息表信息
     *
     * @param prPromotionInfoReq 促销活动信息实体
     * @return PrPromotionInfoRes
     * @author 张靖烽
     * @create 2020-12-08 17:11
     */
    PrPromotionInfoRes modifyPromotionInfo(PrPromotionInfoReq prPromotionInfoReq);

    /**
     * 根据租户ID和活动信息表ID删除信息
     *
     * @param promotionId 活动ID
     * @param tenantId 租户ID
     * @return Boolean
     * @throws TxnException txn
     * @author 张靖烽
     * @create 2020-12-08 17:10
     */
    Boolean removeByPromotionIdAndTenId(String promotionId, String tenantId) throws TxnException;

    /**
     * 通过促销活动信息表ID和租户Id查询
     *
     * @param promotionId 活动ID
     * @param tenantId 租户ID
     * @return PrPromotionInfo
     * @author 张靖烽
     * @create 2020-12-08 17:10
     */
    PrPromotionInfo findByPromotionIdAndTenId(String promotionId, String tenantId);
}
